package com.nut.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.nut.pojo.Color;
import com.nut.pojo.ColorExample;
import com.nut.service.color.ColorServiceI;

/**
*@author Nut
*@version 2018年8月13日 下午7:26:32
*@TODO
*
*/
@Controller
@RequestMapping("/color")
public class ColorController {
	
	@Resource
	ColorServiceI colorService;
	
	@RequestMapping("/list.do")
	@ResponseBody
	public List<Color> list(){
		ColorExample colorExample = new ColorExample();
		colorExample.createCriteria().andIsDelEqualTo(1);
		List<Color> colors = colorService.getColors(colorExample);
		return colors;
	}

}
